package com.jugheadzhou.emrpoc.mapper;

import com.jugheadzhou.emrpoc.dto.MedicalRecordDto;
import com.jugheadzhou.emrpoc.model.MedicalRecord;
import com.jugheadzhou.emrpoc.mybatis.CommonMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author jugheadzhou
 * @date 2021-10-24
 */
public interface MedicalRecordMapper extends CommonMapper<MedicalRecord> {

    /**
     * 查询病历的完成状态
     *
     * @param id
     * @return
     */
    Integer selectPublishedById(String id);

    /**
     * 通过就诊卡号和病历类型查询最大的序列号
     * @param visitCardNo
     * @param type
     * @return
     */
    String selectMaxSerialNumberByVisitCardNoAndType(@Param("visitCardNo") String visitCardNo,@Param("type") String type);

    /**
     * 病历查询
     *
     * @param medicalRecordDto
     * @return
     */
    List<MedicalRecord> list(MedicalRecordDto medicalRecordDto);
}
